#ifndef TABLEMODELS_H
#define TABLEMODELS_H

#include <QAbstractTableModel>
#include <QPair>
#include <QList>

extern "C" {
	#include "slepbase.h"
}

typedef enum{ SlepVector , SlepMatrix } SlepType ;

class CSLEPTuple{
public:
	QString objectName;
	QString objectInfo;
	QString filename;
	slep_matrix *mtrx;
	slep_vector *vctr;
	SlepType type;
	

//public:
//	CSLEPTuple();
};

//CSLEPTuple::CSLEPTuple(){
//	mtrx=0;
//	vctr=0;
//	type = SlepMatrix;
//}


class ObjectListModel : public QAbstractTableModel
{
    Q_OBJECT
    
public:
    ObjectListModel(QObject *parent=0);
    ObjectListModel(QList<CSLEPTuple> listOfTuples, QObject *parent=0);

    int rowCount(const QModelIndex &parent) const;
    int columnCount(const QModelIndex &parent) const;
    QVariant data(const QModelIndex &index, int role) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    Qt::ItemFlags flags(const QModelIndex &index) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
    bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex());
    bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex());
    QList<CSLEPTuple> getList();

private:
    QList<CSLEPTuple> listOfTuples;
};

#endif
